Package org.mozilla.jss.pkix.primitive
Class PBMAC1Params
java.lang.Object
org.mozilla.jss.pkix.primitive.PBMAC1Params
- All Implemented Interfaces:
ASN1Value
PKCS #5 PBMAC1-params from RFC 9879.
PBMAC1-params ::= SEQUENCE {
keyDerivationFunc AlgorithmIdentifier {{PBMAC1-KDFs}},
messageAuthScheme AlgorithmIdentifier {{PBMAC1-MACs}}
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA template class for decoding PBMAC1Params. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AlgorithmIdentifierprivate AlgorithmIdentifierprivate SEQUENCEprivate static final Tagprivate static final PBMAC1Params.Template -
Constructor Summary
ConstructorsConstructorDescriptionPBMAC1Params(AlgorithmIdentifier keyDerivationFunc, AlgorithmIdentifier messageAuthScheme) Creates PBMAC1 parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(OutputStream ostream) Encodes this PBMAC1Params to the output stream.voidencode(Tag implicitTag, OutputStream ostream) Encodes this PBMAC1Params with an implicit tag.Returns the key derivation function (typically PBKDF2).Returns the message authentication scheme (typically HMAC-SHA256/384/512).getTag()Returns the ASN.1 tag for this structure.static PBMAC1Params.TemplateReturns the template for decoding PBMAC1Params.
-
Field Details
-
keyDerivationFunc
-
messageAuthScheme
-
sequence
-
TAG
-
templateInstance
-
-
Constructor Details
-
PBMAC1Params
Creates PBMAC1 parameters.- Parameters:
keyDerivationFunc- The key derivation function AlgorithmIdentifier (typically PBKDF2 with salt, iterations, and PRF)messageAuthScheme- The MAC algorithm AlgorithmIdentifier (typically HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512)
-
-
Method Details
-
getKeyDerivationFunc
Returns the key derivation function (typically PBKDF2). -
getMessageAuthScheme
Returns the message authentication scheme (typically HMAC-SHA256/384/512). -
getTag
Returns the ASN.1 tag for this structure. -
encode
Encodes this PBMAC1Params to the output stream.- Specified by:
encodein interfaceASN1Value- Parameters:
ostream- The output stream- Throws:
IOException- if encoding fails
-
encode
Encodes this PBMAC1Params with an implicit tag.- Specified by:
encodein interfaceASN1Value- Parameters:
implicitTag- The implicit tag to useostream- The output stream- Throws:
IOException- if encoding fails
-
getTemplate
Returns the template for decoding PBMAC1Params.- Returns:
- The PBMAC1Params template
-